package com.air.designmodel.two.entity;

import com.air.designmodel.two.behavior.QuackBehavior;
import com.air.designmodel.two.behavior.impl.Quack;

/**
 * 鸭鸣器
 *
 * @author shent
 */
public class DuckCall {
    protected QuackBehavior quackBehavior;

    public DuckCall() {
        this.quackBehavior = new Quack();
    }

    public void setQuackBehavior(QuackBehavior quackBehavior) {
        this.quackBehavior = quackBehavior;
    }

    public void performQuack() {
        quackBehavior.quack();
    }

}
